#define N 12 

typedef struct 
{
	int			light_up;
	int			light_down;
	char		temp_up;
	char		temp_down;
	char		hum_up;
	char		hum_down;
}env_limit;

typedef struct 
{
	long 		msgtype;
	char 		store;
	env_limit	limit;	
}down_msg;

typedef struct
{
	int 		light;
	int 		adc;
	char 		acc_x;
	char 		acc_y;
	char 		acc_z;
	char 		temp;
	char		hum;
}env_msg;

typedef struct
{
	int 		num;
	char 		goods;
}goods_msg;

typedef struct
{
	env_msg 	env;
	goods_msg 	goods;
}up_msg;
